var html=require("html-webpack-plugin");
var Ex=require("extract-text-webpack-plugin");
module.exports={
	//dirname当前工程目录  output输出到哪里  entry输入入口
	
	//下载命令  webpack
	entry: __dirname+'/src/js/main.js',
	output: {
		path: __dirname+'/dist',
		filename:'[name].js'
	},
	module:{
		rules:[
			{
			test:/\.css$/,
			use:Ex.extract({
				fallback:'style-loader',
				use:'css-loader'
				
			})
			}
		]
	},
	plugins:[
		new html({template:'./src/index.html'}),
		new Ex("[name].css")
	]
}
